#ifndef GLPP_UNIFORM_BUFFER_HPP
#define GLPP_UNIFORM_BUFFER_HPP

#include "../PhoenixInitializer.hpp"

namespace phx { class Model; }

namespace gl
{

class Shader;
class UniformBlock;

class UniformBuffer
{
public:
	static enum StoreType : unsigned char
	{
		STATIC,
		STREAM,
		DYNAMIC
	};

	UniformBuffer();

	bool setData(void *data, unsigned int size, StoreType storeType = StoreType::STATIC);
	bool setSubData(void *data, unsigned int size, unsigned int offset);

	~UniformBuffer();

	friend class gl::Shader;
	friend class gl::UniformBlock;
private:
	GLuint mUbo, mStoredByteSize;
};

}

#endif